<template>
    <div class="bus-card-list-btn">
        <a @click="next" id="next">下一步</a>
    </div>
</template>

<script>
// 自定义方法
import { failTextVantToa } from "_projectFn/prompt"

export default {
    name: 'busCardListBtnMenu',
    props: {
        actTemp: {
            type: Object,
            default: {}
        },
    },
    methods: {
        // 点击下一步
        next() {
            if (this.actTemp.tplNo && this.class === '') {
                sessionStorage.setItem('WriteBusCardWriteData', JSON.stringify(this.actTemp))
                this.$router.push({
                    path: 'WriteBusCard',
                    name: 'WriteBusCard',
                    query: {
                        type: 'default',
                        no: this.actTemp.tplNo
                    }
                })
            }
        }
    },
    computed: {
        actTempData() {
            return Object.assign({}, this.actTemp)
        },
        class() {
            if (Object.keys(this.actTempData).length > 0) {
                return ''
            }
            return 'disable'
        }
    }
}
</script>

<style lang="scss" scoped>
.bus-card-list-btn {
    position: fixed;
    width: 100%;
    height: 50px;
    background: white;
    left: auto;
    bottom: 0;
    border-top: 1px solid #ececec;
    display: flex;
    -webkit-box-shadow: 0px 1px 12px -5px #999999;
    box-shadow: 0px 1px 12px -5px #999999;
    align-items: center;
    justify-content: center;
    padding: 3px;

    #next {
        display: flex;
        width: 100%;
        height: 100%;
        align-items: center;
        justify-content: center;
        background: #0077bf;
        color: white;
    }

    .disable {
        background: #bebebe !important;
    }
}
</style>